package com.liyao.storehouse.controller;

import com.liyao.storehouse.service.storageService;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.Map;

@Controller
@RequestMapping("/storage")
public class storageController {
    @Resource
    storageService service;

    @RequestMapping("/getCheckList")
    @ResponseBody
    public JSONObject getCheckList(int page,int limit){
        return service.getCheckList(page,limit);
    }

    @RequestMapping("/getGoodsList")
    @ResponseBody
    public JSONObject getGoodsList(int page, int limit) {
        return service.getGoodsList(page, limit);
    }

    @RequestMapping("/getStoreDetailsList")
    @ResponseBody
    public JSONObject getStoreDetailsList(String id) {
        return service.getStoreDetailsList(id);
    }

    @RequestMapping("/getOutboundDetailsList")
    @ResponseBody
    public JSONObject getOutboundDetailsList(String id) {
        return service.getOutboundDetailsList(id);
    }

    @RequestMapping("/getCheckDetailsList")
    @ResponseBody
    public JSONObject getCheckDetailsList(String id) {
        return service.getCheckDetailsList(id);
    }

    @RequestMapping("/getGoodsList1")
    @ResponseBody
    public JSONObject getGoodsList1(int page, int limit,String id) {
        return service.getGoodsList1(page, limit,id);
    }

    @RequestMapping("/getStorageList")
    @ResponseBody
    public JSONObject getStorageList(int page, int limit) {
        return service.getStorageList(page, limit);
    }

    @RequestMapping("/getOutboundList")
    @ResponseBody
    public JSONObject getOutboundList(int page, int limit) {
        return service.getOutboundList(page, limit);
    }

    @RequestMapping("/getContainerList")
    @ResponseBody
    public JSONObject getContainerList(int page, int limit) {
        return service.getContainerList(page, limit);
    }

    @RequestMapping("/getContainerList1")
    @ResponseBody
    public JSONObject getContainerList1(int page, int limit,String id) {
        return service.getContainerList1(page, limit,id);
    }

    @RequestMapping("/getContainerList2")
    @ResponseBody
    public JSONObject getContainerList2(int page, int limit, String id) {
        return service.getContainerList2(page, limit, id);
    }

    @RequestMapping("/getContainerList3")
    @ResponseBody
    public JSONObject getContainerList3(int page, int limit, String id) {
        return service.getContainerList3(page, limit, id);
    }

    @RequestMapping("/getContainerAndGoodsList")
    @ResponseBody
    public JSONObject getContainerAndGoodsList(int page, int limit, String goodsId) {
        return service.getContainerAndGoodsList(page, limit, goodsId);
    }

    @RequestMapping("/addSupplies")
    @ResponseBody
    public JSONObject addSupplies(String productCode,String productName,String expectNum,String overfillNum) {
        return service.addSupplies(productCode,productName,expectNum,overfillNum);
    }

    @RequestMapping("/editSupplies")
    @ResponseBody
    public JSONObject editSupplies(String id, String productName, String expectNum, String overfillNum) {
        return service.editSupplies(id, productName, expectNum, overfillNum);
    }

    @RequestMapping("/DelSupplies")
    @ResponseBody
    public JSONObject DelSupplies(String id) {
        return service.DelSupplies(id);
    }

    @RequestMapping("/activation")
    @ResponseBody
    public JSONObject activation(String id) {
        return service.activation(id);
    }

    @RequestMapping("/DelStore")
    @ResponseBody
    public JSONObject DelStore(String id) {
        return service.DelStore(id);
    }

    @RequestMapping("/addStorage")
    @ResponseBody
    public JSONObject addStorage(String id,String overfill) {
        return service.addStorage(id,overfill);
    }

    @RequestMapping("/addStorage1")
    @ResponseBody
    public JSONObject addStorage1(String id, String overfill, String containerId) {
        return service.addStorage1(id, overfill,containerId);
    }

}
